#include "responsive_form.h"
#include "login_form.h"
#include "login_button.h"
#include "scroll_bar.h"
#include "registration_form.h"

#include <QApplication>

int main(int argc, char *argv[])
{

    QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); // Qt6 enables high DPI by default
    QApplication a(argc, argv);

    // Get current application directory path
    QString app_path = QCoreApplication::applicationDirPath();
    // Build file name
    QString fileName = "config.ini";
    QString config_path = QDir::toNativeSeparators(app_path + QDir::separator() + fileName);
    QSettings settings(config_path, QSettings::IniFormat);
    QString gate_host = settings.value("GateServer/host").toString();
    QString gate_port = settings.value("GateServer/port").toString();
    gate_url_prefix = "http://"+gate_host+":"+gate_port;

    Responsive_form r;
    r.show();

    return a.exec();
}
